This invention relates generally to the description of software objects, and more particularly to such a description that is token-based, for purposes of dynamic action invocation.
Dynamic action invocation is a very powerful software engineering technique. A simple case of it has been popularized by using C++ classes to implement polymorphic handling of window messages in programs running under Microsoft Windows operating system. It is very useful to generalize this technique to handle more general objects, and also handle actions that depend equally on multiple objects.
Software objects have generally become the norm when creating new computer programs. Most current programming languages, such as C++ and Java, provide for the use of software objects. In addition, software methodologies such as that provided for by Microsoft Corp.""s Component Object Model (COM), as known within the art, also provide for the use of software objects. A software object may be defined in a nonexclusive and non-limiting sense as a software component having a number of attributes, such as types and/or parameters. A computer program thus may be defined in a nonexclusive and non-limiting sense as a collection of software objects that interact with one another in accordance with a desired manner.
Usually, the classification, or typing, of these software objects is hierarchical in nature, such that there is an implied transitive relationship between types. Thus if an object is of type A, and type A inherits from B, and objects of type B inherit from C, then the object is considered to be also of types B and C. This may make for inefficient description of objects. That is, describing all aspects of an object""s attributes may be inefficient where the object is part of a hierarchical classification of objects in that the resulting description of the object may be overly verbose.
A non-software example is illustrative for purposes of understanding in this regard. An object defined as a xe2x80x9ctall red flowerxe2x80x9d is considered. This object is (1) a flower, is (2) a red flower, is (3) a tall flower, is (4) tall and red, is (5) tall, is (6) red, and is (7) a tall red flower. Thus, seven different aspects are needed to completely describe the object, making for an inefficient manner by which to describe this object. For these and other reasons, therefore, there is a need for the present invention.
The above-identified problems, shortcomings and disadvantages with the prior art, as well as other problems, shortcoming and disadvantages, are solved by the present invention, which will be understood by reading and studying the specification and the drawings. In one embodiment, a system includes a plurality of objects and a set of tokens. Each object has at least one attribute, such as one or more types and/or one or more parameters. Each token is mapped to a unique attribute. Thus, each object is describable utilizing the set of tokens.
Thus, embodiments of the invention provide for advantages not found in the prior art. For example, with respect to the example provided in the background section, in one particular embodiment a xe2x80x9ctall red flowerxe2x80x9d object is describable using three sequentially linked tokens: (1) a xe2x80x9ctallxe2x80x9d token, (2) a xe2x80x9credxe2x80x9d token, and (3) a xe2x80x9cflowerxe2x80x9d tokenxe2x80x94as compared to seven aspects as in the prior art. Thus, flattening a hierarchical-based typing scheme into a token-based description scheme provides for more efficient object description.
The invention includes systems, methods, computers, and computer-readable media of varying scope. Besides the embodiments, advantages and aspects of the invention described here, the invention also includes other embodiments, advantages and aspects, as will become apparent by reading and studying the drawings and the following description.